Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Separate DisplayServer from OS and add multiple windows support #37317

Merged
merged 18 commits into from
Mar 26, 2020

Conversation

akien-mga
Copy link
Member

@akien-mga akien-mga commented Mar 26, 2020

Same content as the display-server branch that @reduz worked on (with help from @kuruk-mm and @bruvzg), but rebased on top of the current master branch (only took ~5 hours!).

  • OS is split into OS and DisplayServer.
  • X11 OS is renamed to LinuxBSD (Linux, FreeBSD and OpenBSD "desktop" systems as per Freedesktop), X11 is now its first DisplayServer implementation (DisplayServerWayland can be added eventually).
  • Input refactor (the singleton is now InputFilter).
  • Adds Window node which is the new scene root.
  • Multiple window support.
  • Dialogs, Popups and Inspector docks now use Window.
  • Lots of bugs, let's bring back instability to the master branch!

I forgot to use --preserve-merges when rebasing, so we lost the references to PRs #36936 and #37029 which were merged in display-server.

@akien-mga
Copy link
Member Author

akien-mga commented Mar 26, 2020

@YeldhamDev You know the drill after all these years and this happening twice a year ;)

find -name "*.gen.*" -delete

(Or git clean -fxd since all the .x11.* stuff is now obsolete too.)

Maybe we should rename .gen.* files to .delete_me_if_im_in_an_error.* ;)

@YeldhamDev
Copy link
Member

@akien-mga Sorry, I tend to forget to clean up the files in those situations, probably because it reminds me of how much time it will take to compile everything again... :V

@bruvzg
Copy link
Member

bruvzg commented Mar 26, 2020

You might want to check if I didn't miss anything else though, it took me several iterations to figure out that changes had been lost in the DisplayServer split for macOS and Windows - and Input changed too so that didn't help :D

There's k->set.keycode(0); instead of k->set_keycode(0); on the line 3040 of display_server_osx.mm, everything else seems to be OK.

bruvzg and others added 2 commits March 26, 2020 16:24
Change global menu to use Callable, add support for check items and submenus.
Also re-enable macOS builds disabled in dbb3f99.
@Xrayez
Copy link
Contributor

Xrayez commented Mar 26, 2020

Why are we renaming Input to InputFilter?

I prepared a proposal already to discuss this: godotengine/godot-proposals#639. 🙂

@ballerburg9005
Copy link

This issue was referenced by one/some of the "multi monitor support" issues and I just installed Godot 4 from git because I was hoping that I could just pop the main tabs like the code editor or the help into a new window, so I can expand that window on one of my other monitors.

Oddly enough, everything but the code editor now pops into a new window (like context menus from the main menu, when I rightclick something the right click menu becomes a new window and so forth).

I am not sure how this works out for MS Windows, but I am on Linux and I also use a tiled/tabbed window manager and it totally breaks everything the program is virtually unusable. My window manager allows me to totally disable the tiling - so its not really an issue of WM either. Usually you only need to disable tiling for totally outlandish weird apps (like Acroread blob from 1998 and similar), but still no matter what I configure, the context menus open in the wrong place and flip open and closed back and forth sometimes.

I am not exactly sure if this commit is to blame, from what I saw at first glance it is.

But how on earth did it all play out like this?

For multi-monitor: Couldn't you guys just quickly add a button "make floating" for some of the tabs, like the code editor (especially that!), or all of the tabs?

The "make floating" already is there for the Dock in the Dock context menu.

I mean, for multi-monitor support why make absolutely everything open in a new window even context menus? That seems totally mental to me.

Just make a single button that opens a single additional window, in which you can hard-code a new code editor or dock tabs from the main screen to and hundreds of people can use at least two screens and will be totally happy.

akien-mga added a commit to akien-mga/godot that referenced this pull request Apr 28, 2020
It changed name as part of the DisplayServer and input refactoring
in godotengine#37317, with the rationale that input no longer goes through the
main loop, so the previous Input singleton now only does filtering.

But the gains in consistency are quite limited in the renaming, and
it breaks compatibility for all scripts and tutorials that access
the Input singleton via the scripting language. A temporary option
was suggested to keep the scripting singleton named `Input` even if
its type is `InputFilter`, but that adds inconsistency and breaks C#.

Fixes godotengine/godot-proposals#639.
Fixes godotengine#37319.
Fixes godotengine#37690.
@akien-mga akien-mga deleted the display-server-rebased branch October 4, 2021 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants